<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        .box {
            height: 130px;
            width: 130px;
            overflow: hidden;
            position: relative;
            border: 1px solid #8CD892;
        }

        .box img {
            height: 130px;
            width: 130px;
        }

        .box a {
            display: block;
            height: 130px;
            position: absolute;
            background: #000;
            color: white;
            line-height: 25px;
            padding: 5px;
            opacity: 0.6;
            text-decoration: none;
            top: 100px;
        }
    </style>
</head>

<body>
    <div id="picList">
        <div class="box">
            <img src="../img/go_up.png" alt="">
            <a href="###"> 文字介绍 <br>这是关于图片的说明 </a>
        </div>
    </div>
    <script>
        var Text = document.getElementById('picList').getElementsByTagName('div');
        var textHeight = 130;
        for (var i = 0; i < Text.length; i++) {
            Text[i].onmouseover = showMeg;
            Text[i].onmouseout = hideMeg;
        }

        function showMeg() {
            this.getElementsByTagName('a')[0].style.top = 0;
        }

        function hideMeg() {
            this.getElementsByTagName('a')[0].style.top = textHeight + 'px';
        }
    </script>
</body>

</html>